<!--
 * @Author: Gary 289602025@qq.com
 * @Date: 2024-04-19 00:03:26
 * @LastEditors: Gary 289602025@qq.com
 * @LastEditTime: 2024-04-19 00:03:29
 * @FilePath: \vue3-test\bak\17_provide inject\Father.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    this is father.
    <Son1></Son1>
  </div>
</template>

<script setup lang="ts">
  import { provide, reactive, ref } from 'vue'
  import Son1 from './Son1.vue'

  let car = reactive({
    price: 79800,
    brand: '比亚迪'
  })
  function upateCarPrice() {
    car.price += 10
  }
  provide('car', { car, upateCarPrice })
</script>

<style>
</style>